﻿@model PagedList.IPagedList<VietPremier.Models.DestinationStyle>

@{
    ViewBag.Title = "TourSearch";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="row-fluid">
    <div class="span3">
    	@Html.Action("LeftMenu","Home")
        @Html.Action("Onlinesupport","Home")
        @Html.Action("Spotlight","Home")
		@Html.Action("News_Event","Home")
    </div><!--/ .span3-->
   	<div class="span9">
        <div class="link-page">
            <a href="@Url.Action("Index","Home")">Trang chủ&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")">&nbsp;</a>
            <a href="@Url.Action("Index","Destination")">Destination&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")">&nbsp;</a>
            <span>@ViewBag.CountryName</span>
		</div>
        <div class="box-about">
            <h5>@ViewBag.CountryName</h5>
            <div class="vietnam">
                <h5>@ViewBag.StyleName</h5>
                <div class="row-fluid">
                    @if(Model.Count()>0)    
                    {
                    <div class="span6 wheretosay">   
                            @for (int i = 0; i < @Model.Count(); i += 2)
                            {                                      
                            <div class="it">
                            <div class="img">
                                <div class="img-inner">
                                <a href="@Url.Action("DestinationDetail", "Destination", new { id = @Model[i].IdDestination })"> 
                                    @{
                                        var imageFile = "~/Content/upload/destination/";
                                        if (@Model[i].Image != null)
                                        {
                                            imageFile +=@Model[i].Image;
                                        }
                                        else
                                        {
                                            imageFile += "no-photo.jpg";
                                        }
                                        

                                        <img src= "@Url.Content(imageFile)" style="width:100px; height:100px" alt="" />
                                    }

                                </a>
                                </div>
                            </div>
                            <h4><a class="title" href="@Url.Action("DestinationDetail", "Destination", new { id = @Model[i].IdDestination })">@Model[i].DestinationName</a></h4>
                            <small class="price">Price: @Model[i].Price</small>
                            <small class="tripcode">Tripcode: @Model[i].TripCode</small>
                            <small class="tripcode">Duration: @Model[i].Time</small>
                            <small class="journey">@Model[i].Duration</small>
                        </div><!--/ .it-->                                                                
                                           
                            }                                   
                                   
                    </div> <!--/ .span6--> 
                        <div class="span6 wheretosay">   
                            @for (int i = 1; i < @Model.Count(); i += 2)
                            {                                      
                            <div class="it">
                            <div class="img">
                                <div class="img-inner">
                                <a href="#"> 
                                    @{
                                        var imageFile = "~/Content/upload/destination/";
                                        if (@Model[i].Image != null)
                                        {
                                            imageFile +=@Model[i].Image;
                                        }
                                        else
                                        {
                                            imageFile += "no-photo.jpg";
                                        }
                                        

                                        <img src= "@Url.Content(imageFile)" style="width:100px; height:100px" alt="" />
                                    }

                                </a>
                                </div>
                            </div>
                            <h4><a class="title" href="@Url.Action("DestinationDetail", "Destination", new { id = @Model[i].IdDestination })">@Model[i].DestinationName</a></h4>
                            <small class="price">Price: @Model[i].Price</small>
                            <small class="tripcode">Tripcode: @Model[i].TripCode</small>
                            <small class="tripcode">Duration: @Model[i].Time</small>
                            <small class="journey">@Model[i].Duration</small>
                        </div><!--/ .it-->                                                                
                                           
                            }                                   
                                   
                    </div> <!--/ .span6-->
                    }
                    <div class="pagination pagination-centered">
                    @* <ul>
                        <li class="active"><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                    </ul>*@
                            <p class="pull_right">Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
                            of @Model.PageCount Items</p>
                    <ul>
                        @if (Model.HasPreviousPage)
                        {
                            <li><a href="@Url.Action("DestinationStyle", "Destination", new { page = 1 })" >«</a></li>
                                    
                        }
                        else
                        {
                            <li class="disabled"><a href="#">«</a></li>
                        }
                        @for (int i = 1; i <= Model.PageCount; i++)
                        {
                            if (i == Model.PageNumber)
                            {
                                <li class="active"><a href="@Url.Action("DestinationStyle", "Destination", new { page = i })">@i</a></li>
                            }
                            else
                            {
                                <li><a id="page-number" href="@Url.Action("DestinationStyle", "Destination", new { page = i })">@i</a></li>
                            }
                        }
                        @if (Model.HasNextPage)
                        {
                    
                            <li><a href="@Url.Action("DestinationStyle", "Destination", new { page = @Model.PageCount })">>></a></li>
                     
                        }
                        else
                        {
                            <li><a href="#">»</a></li>
                        }
                    </ul>
                </div>
                </div><!--/ .pagination-->  
                </div><!--/ .row-fluid--> 
                </div><!--/ .vietnam-->
            </div> <!--/ .box-about-->
</div>